package com.example.demo.TestController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;

/**
 * Description:
 * User: 故我
 * Date: 2023-10-31
 * Time: 13:01
 */
@RequestMapping("/json")
@Controller
@ResponseBody
public class jsonController {
    @RequestMapping("/getjson")
    public HashMap<String,String> getJson(){
        HashMap<String,String> hashMap = new HashMap<>();
        hashMap.put("json","jsonvalue");
        hashMap.put("java","javavalue");
        hashMap.put("C++","C++Vaule");
        return hashMap;
    }
}
